<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>管理中心首页</title>
	<link rel="stylesheet" href="__PUBLIC__/admin/css/index.css" />
        <script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
        <script>
            $(function(){
                $('.del').click(function(){
                    if(!confirm('确定要删除此分类?')){
                        return false;
                    }
                });
            })
            
        </script>
</head>
<body>
	<div class='content'>
		<div class='t'>
			<h3>商品分类</h3>
		</div>
		<table class='tb' >
			<tr>
				<th class="blue">分类ID</th>
				<th class="blue">分类名称</th>
				<th class="blue">操作</th>
			</tr>
                    <?php if(is_array($data)): foreach($data as $key=>$ca): ?><tr>
				<td><?php echo ($ca["cid"]); ?></td>
                                
				<td><?php if($ca['pid'] != 0): ?>|<?php endif; echo ($ca["html"]); echo ($ca["name"]); ?></td>
				<td>
                                    <a href="<?php echo U('Category/addShow',array('cid'=>$ca['cid']));?>">添加子分类</a>
					<a href="<?php echo U('Category/editShow',array('cid'=>$ca['cid']));?>">编辑</a>
					<a class="del" href="<?php echo U('Category/del',array('cid'=>$ca['cid']));?>">删除</a>
				</td>
			</tr><?php endforeach; endif; ?>
		</table>
		 <div><?php echo ($page); ?></div>
	</div>

</body>
</html>